dsplayerfandomcom-20200215-history
HOW-TO: Using DSPlayer
DSPlayer is a DirectShow based player for XBMC. DSPlayer support DXVA hardware acceleration (works in Windows XP, Vista and 7), as well as any custom directshow filters (ffdshow, ac3filter, haali media splitter ...). New builds can be found here. And the source here. Installing Installing dsplayer is the same thing that installing XBMC. Grab the installer from this thread(Usually, lastest revision is better), and run the setup. Note: you don't need to uninstall previous versions of XBMC. However, some users reported that installing dsplayer over an existing installation of xbmc cause unexpected behavior. Now, dsplayer should be installed, still a few step to be able to use it. Using DSPlayer with XBMC Three ways for using DSPlayer : *You can right click on the media file, select Play with and choose DSPlayer. If you don't use the mouse, press c''' in order to pop up the context menu. *You can also make DSPlayer your default player in editing the advancedsettings.xml file like that : dsplayer *You can also use the playercorefactory.xml file for fine tuning the extensions Configuring In order to use dsplayer, you need to edit a configuration file to tell dsplayer which filters using when playing your files. To do that, you have to edit two XML files, named '''filtersconfig.xml and mediasconfig.xml. These files are located in system/players/dsplayer. However, if you want to add some filters or media rules, the best is to create your own XML file in the userdata folder. The XML files must be in a dsplayer folder. You should have something like that : C:\Users\XXX\AppData\Roaming\XBMC\userdata\dsplayer\filterconfig.xml. The filters or rules declared on the userdata folder overrides those declared in the system folder. You can see at the bottom of the page the default XML files. WARNING: You must have basic knowledge of XML. If that's not your case, the best is to go here before! Let's now see how the filtersconfig.xml and mediasconfig.xml files look like. First of all, the filtersconfig.xml file. 'Filters declaration' Note: the filtersconfig.xml file must starts with ' and ends with ' Let's see how to declare a filter in dsplayer. MatroskaSplitter.ax {0A68C3B5-9164-4A54-AFAF-995B2FF0E0D4} MKV Source Contrary to other players, dsplayer doesn't need filters to be registered in order to use it. A filter declaration always starts with the filter tag : he type attribute must be one of the following, depending of what type of filter you want to add: *'source' *'splitter' *'videodec' *'audiodec' *'extra' The name attribute is mandatory. We'll see in the next section its role. Be careful, don't use space in the filter name, only letters and number. We now need to specify another mandatory tag, the guid tag. A GUID (Globally Unique Identifier) is an unique identifier which allow media players to load filters. You need the guid of you filter in order to use it with dsplayer. Some examples of popular filters guid : *ffdshow video decoder : {04FE9017-F873-410E-871E-AB91661A4EF7} *ffdshow audio decoder : {0F40E1E5-4F79-4988-B1A9-CC98794E6B55} *haali media splitter : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D} You can find guid on the internet, or on the website of the filter. Now, we have our filter guid : {00000000-0000-0000-0000-000000000000} What's next? We need to give the filter a name (shown in xbmc when pressing the i''' key), using the '''osdname tag, like that : {00000000-0000-0000-0000-000000000000} My Filter Name Ok, now, two choices : *The filter is registered on the system. You're done with the filter configuration, congratulations! *The filter is not registered on the system. You need to add the path tag to your filter configuration : C:\MyFilter.ax {00000000-0000-0000-0000-000000000000} My Filter Name The path tag can be relative to the filtersconfig.xml directory or absolute. Note: All filter tags must be surrounded by You know how to add a filter, let's see how use that filter with a media file using the mediasconfig.xml 'Associate media files with filters' Note: the mediasconfig.xml file must starts with ' and ends with ' To render a file, dsplayer need four filters : *A source filter, which reads the media file *A splitter filter, which splits the video and audio(s) streams *A video decoder filter, which decodes the video stream *An audio decoder filter, which decodes the audio(s) stream(s) In many cases, the source filter is also the splitter filter. But in some cases (like rar playing), the source and splitter filters are different. You must specify at least four filters (a source, a splitter, a video decoder, an audio decoder) in order to add a new extension to dsplayer. New extensions are added like that : You need to replace my_extension by your media file extension (like mkv, avi, mov ...), and each my_xxx_filter by the name of the filter declared in filtersconfig.xml (there's a complete example at the bottom of the page, you can look at it if you don't understand) Note: All rule tags must be surrounded by .... 'Extra filters' You can also add extra filters to the graph. These are filters like AC3Filter, Equalizer, ... Just add an extra tag to your media declaration, like that : NOTE: Of course, the extra filter needs to be declared in filtersconfig.xml first! 'Rule-based filter's selection' Starting with revision 27937-update, dsplayer supports rule-based filter's selection, using the same convention that the playercorefactory.xml. You can now select filters using rule based on filename, video / audio codec, dxva, ... Here an example : NOTE: If multiple rules are valid for a media file, first declared rule is prioritary. 'Shaders support ' Starting with r33843, you can now use pixel shaders from mediasconfig.xml. The shaders are declarated in the shaders.xml file, located at system/players/dsplayer/Shaders/shaders.xml. Each shader has an id. That's this id which will be used to track the shader. You can add a shader to a rule with the following syntax : Shaders are drawn on the screen in the specified order. As you can see, the shader tag supports the same rules as the video or audio tag! 'Renderer settings' Starting with revision 31004, you can now change some default settings of the renderer with an xml file named renderersettings.xml, and located in userdata\dsplayer\renderersettings.xml. The XML file has the following structure : Each setting has the following structure : settings_value And here is a list of all possible settings : External links *MPCHC Wiki – Media Player Classic Home Cinema Wiki Examples 'Using ffdshow instead of mpcvideodec for mkv' ffdshow is already declared in the mediasconfig.xml shipped with dsplayer. The only things you need to do is to find the rule tag for mkv file, and change to Finaly, you should have that : 'Using Haali Media Splitter for mkv' In this subsection, we assume that Haali Media Splitter is installed on the system. In order to use Haali, you first need to declare the filter in the filters section : {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D} Haali Media Splitter We named this filter haali. Now, we just need to find the mkv rule tag, and change to Finaly, you should have that : Troubleshooting '"Failed to load external filter"' If your debug log shows "Failed to load external filter", please do the following : *Please check if the file exists (use the path in the log) *If you are using ffdshow, you need to make sure XBMC is in the white list. See here for more details. You'll need to make the change in the three ffdshow filters (dxva, video and audio) How-to: Retrieve a filter's guid This section works only if the filter is registered on your system. If not, look on the internet for the guid. You'll need GraphStudio. First, launch GraphStudio. Go to Graph, Insert Filter (shortcut Ctrl+F) You should see a list of all the filters registered on your system. Just look for the filter you want, select it, and informations for that filters appears on the right. The GUID is labeled as CLSID Complete XML files (updated 2010/06/04) 'filtersconfig.xml ' MPCVideoDec.ax {008BAC12-FBAF-497B-9670-BC6F6FBAE2C4} MPC Video Decoder {04FE9017-F873-410E-871E-AB91661A4EF7} ffdshow Video Decoder {0B0EFF97-C750-462C-9488-B10E7D87F1A6} ffdshow DXVA Decoder {09571A4B-F1FE-4C60-9760-DE6D310C7C31} CoreAVC Video Decoder {BEF49ADB-9EC1-4AF2-8E50-90F226CC4843} CyberLink Video Decoder {82D353DF-90BD-4382-8BC2-3F6192B76E34} WMVideo Decoder true {4a69b442-28be-4991-969c-b500adf5d8a8} Mpeg2DecFilter.ax {39F498AF-1A09-4275-B193-673B0BA3D478} mpeg2 Video Decoder {238D0F23-5DC9-45A6-9BE2-666160C324DD} RealAlternative Video Decoder {2DE1D17E-46B1-42A8-9AEC-E20E80D9B1A9} Broadcom VideoDecoder MpaDecFilter.ax {3D446B6F-71DE-4437-BE15-8CE47174340F} Mpa Decoder {0F40E1E5-4F79-4988-B1A9-CC98794E6B55} ffdshow audio decoder {2EEB4ADF-4578-4D10-BCA7-BB955F56320A} WMAudio Decoder true {57f2db8b-e6bb-4513-9d43-dcd2a6593125} {941A4793-A705-4312-8DFC-C11CA05F397E} RealAlternative Audio Decoder audioswitcher.ax {18C16B08-6497-420E-AD14-22D21C2CEAB7} 1 DCGraphicEQ.ax {E4DCD60C-F449-4C78-895B-1FE9F85C7EDD} DC-GraphicEQ {A753A1EC-973E-4718-AF8E-A3F554D45C44} AC3Filter {9B8C4620-2C1A-11D0-8493-00A02438AD48} DVD Navigator {187463A0-5BB7-11D3-ACBE-0080C75E246E} WM ASF Reader AviSplitter.ax {CEA8DEFF-0AF7-4DB9-9A38-FB3C3AEFC0DE} AVI Source FLVSplitter.ax {C9ECE7B3-1D8E-41F5-9F24-B255DF16C087} FLV Source MP4Splitter.ax {3CCC052E-BDEE-408A-BEA7-90914EF2964B} MP4 Source MatroskaSplitter.ax {0A68C3B5-9164-4A54-AFAF-995B2FF0E0D4} MKV Source MpegSplitter.ax {1365BE7A-C86A-473C-9A41-C0A6E82C9FA3} Mpeg Source OggSplitter.ax {6D3688CE-3E9D-42F4-92CA-8A11119D25CD} Ogg Source {765035B3-5944-4A94-806B-20EE3415F26F} RealAlternative Source {4F8BF30C-3BEB-43A3-8BF2-10096FD28CF2} TS File Source {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D} Haali Media Splitter AviSplitter.ax {9736D831-9D6C-4E72-B6E7-560EF9181001} AVI Splitter FLVSplitter.ax {47E792CF-0BBE-4F7A-859C-194B0768650A} FLV Splitter MP4Splitter.ax {61F47056-E400-43D3-AF1E-AB7DFFD4C4AD} MP4 Splitter MatroskaSplitter.ax {149D2E01-C32E-4939-80F6-C07B81015A7A} MKV Splitter MpegSplitter.ax {DC257063-045F-4BE2-BD5B-E12279C464F0} Mpeg Splitter OggSplitter.ax {9FF48807-E133-40AA-826F-9B2959E5232D} Ogg Splitter {E21BE468-5C18-43EB-B0CC-DB93A847D769} RealAlternative Splitter {AFB6C280-2C41-11D3-8A60-0000F81E0E4A} MPEG-2 Demultiplexer 'mediasconfig.xml'